// 温度
const tempLine = "0,164,255"
const tempColors = [
  [0, [220, 229, 231]],
  [273.16 - 20, [15, 125, 255]],
  [273.16 - 16, [12, 201, 246]],
  [273.16 - 12, [21, 238, 251]],
  [273.16 - 8, [29, 251, 221]],
  [273.16 - 4, [19, 246, 147]],
  [273.16 + 0, [18, 255, 96]],
  [273.16 + 2, [4, 255, 65]],
  [273.16 + 4, [3, 255, 63]],
  [273.16 + 7, [6, 253, 61]],
  [273.16 + 10, [157, 255, 53]],
  [273.16 + 13, [252, 250, 35]],
  [273.16 + 16, [254, 228, 18]],
  [273.16 + 19, [255, 195, 0]],
  [273.16 + 22, [255, 174, 0]],
  [273.16 + 25, [255, 97, 0]],
  [273.16 + 28, [255, 26, 0]],
  [273.16 + 31, [236, 0, 5]],
  [273.16 + 34, [206, 0, 0]],
  [273.16 + 37, [132, 10, 2]],
  [273.16 + 40, [100, 4, 3]]
]

const waterTempColors = [
  [0, [220, 229, 231]],
  // [0, [25, 18, 252]],
  [2, [25, 18, 252]],
  [4, [21, 238, 251]],
  [6, [19, 246, 147]],
  [10, [4, 255, 65]],
  [15, [6, 253, 61]],
  [20, [252, 250, 35]],
  [25, [255, 174, 0]],
  [30, [255, 0, 0]],
  [35, [100, 4, 3]],
]

// 洋流 m/s
const flowColors = [
  [0, [220, 229, 231]],
  [0.02, [15, 125, 255]],
  [0.04, [12, 201, 246]],
  [0.06, [21, 238, 251]],
  [0.08, [29, 251, 221]],
  [0.1, [19, 246, 147]],
  [0.12, [18, 255, 96]],
  [0.16, [4, 255, 65]],
  [0.18, [3, 255, 63]],
  [0.2, [6, 253, 61]],
  [0.3, [157, 255, 53]],
  [0.4, [252, 250, 35]],
  [0.5, [254, 228, 18]],
  [0.6, [255, 195, 0]],
  [0.7, [255, 174, 0]],
  [0.8, [255, 97, 0]],
  [0.9, [255, 26, 0]],
  [1.0, [236, 0, 5]],
  [1.2, [206, 0, 0]],
  [1.5, [132, 10, 2]],
  [2, [100, 4, 3]]
]

// 气压 - 气压越低，颜色越深
const mslColors = [
  [90000, [69, 41, 51]],
  [92000, [77, 34, 60]],
  [94000, [95, 23, 61]],
  [96000, [107, 40, 67]],
  [98000, [125, 39, 64]],
  [99000, [165, 60, 81]],
  [99500, [170, 84, 67]],
  [100000, [173, 136, 57]],
  [100300, [200, 156, 80]],
  [100600, [240, 186, 100]],
  [100900, [255, 200, 155]],
  [101200, [206, 230, 233]],
  [101500, [75, 140, 160]],
  [101900, [57, 101, 190]],
  [102200, [57, 50, 240]],
  [102500, [35, 30, 250]],
  [103000, [0, 8, 103]],
  [104000, [20, 60, 20]],
  [105000, [111, 157, 20]]
]

// 海浪
const shwwColors = [
  [0, [220, 229, 231]],
  [0.5, [25, 18, 252]],
  [1, [21, 238, 251]],
  [1.4, [19, 246, 147]],
  [1.8, [4, 255, 65]],
  [2, [6, 253, 61]],
  [4, [252, 250, 35]],
  [6, [255, 174, 0]],
  [8, [255, 0, 0]],
  [10, [100, 4, 3]],
]

// 盐度
const saltColors = [
  [0, [220, 229, 231]],
  [28, [25, 18, 252]],
  [29, [21, 238, 251]],
  [30, [19, 246, 147]],
  [31, [4, 255, 65]],
  [32, [6, 253, 61]],
  [33, [252, 250, 35]],
  [34, [255, 174, 0]],
  [35, [255, 0, 0]],
  [36, [100, 4, 3]],
]

const lineColor = {
  temp: tempLine,
  sst: tempLine,
  salt: tempLine,
  shww: tempLine,
}

export {
  tempColors, // 温度
  waterTempColors,
  mslColors, // 气压
  shwwColors, // 海浪
  flowColors, // 洋流
  saltColors, // 盐度
  lineColor
}